<%= render :partial => '/organizations/menu' %>
<td class = "content_area">
	<h2><hr>Officers for A.Y. <%="#{@schoolyear} #{@sem}" %><hr></h2>
	<%= error_messages_for 'member' %>
	<div id='error'><%= flash[:error] %></div>
	<div id='notification'><%= flash[:notice] %></div>
	<div class="content"><br><font color ="red"><strong>Note: All students must confirm their membership to all the organizations of their affiliation before the recognition period closes, otherwise they will be automatically deleted from the list. 
	Confirmation is sent via UP webmail account only. </strong></font><br><br></div>
	<% if  @editable %><font size = 2>
		<% form_for :student, :url => {:action => 'create_form3'} do |f| %>
			<table align="center" width = "95%">
			<tr>
			<td>Student no.: <%= f.text_field :student_no, :size => 10 %> <br>
			<center><i>(example: 200123456)</i></center>
			</td>
			<td>UP Webmail: <%= f.text_field :webmail, :size => 11 %><i>@up.edu.ph</i><br>
			<center><i>(example: jldelacruz)</i></center>
			</td>
			<td>Position: <%= f.text_field :position, :size => 15 %></font><br>
			<center><i>(example: president)</i></center>
			</td>
			<td><%= submit_tag 'Add Officer' %><br><br></td>
			</tr>
			</table><br><br>
		<% end %>
	<% end %>
	<div class = "content">
	
	<% unless @members.empty? %>
		<table class = "form_table" border = 1>
			<tr>
				<th width="18%">Student No</th>
				<th width="30%">UP Webmail</th>
				<th>Position</th>
				<th>Confirmed<br>Membership</th>
			</tr>
		<% for member in @members %>
			<tr>
				<td><%=h member.student.student_no %><br>
					<% if  @editable %>
					<font size=1><%= link_to 'delete', {:action => 'destroy', :id => member.id}, :confirm => "Are you sure you want to delete this member?" %></font>
					<% end %>
				</td>
				<td><%=h member.student.webmail %></td>
				<td><%=h member.position %></td>
				<td><% if member.confirm %>Yes<% else %>No<% end %></td>
			</tr>
		<% end %>
		</table>
	<% end %>
	</div>
	<br>
	<%= button_to 'Back', :controller => 'organizations', :action => 'show_forms' %></th>
</td>